package com.opencee.common.security;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * rest接口配置
 *
 * @author yadu
 */
@Data
@ConfigurationProperties("security")
public class SecurityProperties {

    /**
     * 启用认证
     */
    private boolean enable = true;

    /**
     * jwt签名密钥
     */
    private String jwtSigningKey = SecurityConstants.DEFAULT_JWT_SIGN_KEY;
    /**
     * jwt私有信息aes密钥
     */
    private String jwtClaimsAesKey = SecurityConstants.DEFAULT_JWT_CLAIMS_AES_KEY;

    /**
     * jwt过期时间
     */
    private long jwtExpires = 3600 * 1000;

    /**
     * 放行
     */
    private List<String> permitAll = new ArrayList<>();
}
